#!/bin/bash
clear

if [[ "$EUID" -ne 0 ]]; then
    echo "Script need to be run as root!" && exit 1
fi

dependencies=(libnet-ssleay-perl libauthen-pam-perl libpam-runtime libio-pty-perl)
for pkg in "${dependencies[@]}"; do
  apt-get -y -qq install $pkg
done

wget -qO - http://www.webmin.com/jcameron-key.asc | apt-key add -
echo 'deb http://download.webmin.com/download/repository sarge contrib' | tee /etc/apt/sources.list.d/webmin.list

apt-get -qq update
apt-get -y -qq install webmin
